<?php

namespace app\common\model;

class Quizzes extends \think\Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    public function getAnswerJsonAttr($value)
    {
        $answer_array=json_decode($value,true);
        shuffle($answer_array);//选项打乱
        return $answer_array;
    }
}